package com.iiapk.gridnew;

import android.app.Activity;
import android.net.Uri;
import android.os.Bundle;
import android.widget.Toast;
import com.weibo.net.Weibo;
import com.weibo.net.WeiboException;

public class TransferActivity extends Activity {
	
	public void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		Uri uri = this.getIntent().getData();
		String oauth_verifier = uri.getQueryParameter("oauth_verifier");
		Weibo mWeibo = Weibo.getInstance();
		mWeibo.addOauthverifier(oauth_verifier);
		try {
			mWeibo.generateAccessToken(this, null);
			mWeibo.share2weibo(this, mWeibo.getAccessToken().getToken(),
			mWeibo.getAccessToken().getSecret(), Weibo.content, Weibo.img, ShareActivity.class);
		}catch (WeiboException e1) {
			Toast.makeText(this,e1.getMessage(), Toast.LENGTH_LONG);
		}
	}
}
